﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UCLHLCBTNS.ascx.cs" Inherits="Web.Controls.LAIHAN.UCLHLCBTNS" %>
<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>

<script type="text/javascript">

   
    function UCLHLCBTNS_CallbackComplete(e) {
        if (e.parameter == "YueTiaoZSY")
        {
            alert('成功');
            return;
        }

        var rs = e.result;
        var arr = rs.split('|');
        var type = arr[0];
        var state = arr[1];
        var specialIdentity = arr[2];
        var msg = arr[3].split('-');
        if (msg[0] == 'True') {
            alert(msg[1]);
        }
        UCLHLCBTNS_hdCollection.Set("type", type);
        if (state == 'True') {
            if (type != "fstj") {
                UCLHLCBTNS_btnActPerform.onClick();
            }
            else {
                parent.layer.closeAll();
            }
        }
        else {
                        
        }

       
        //if (state != "0") {
        //    alert(arr[2]);
        //}
        //else {
        //    alert(arr[2]);
        //    UCLHLCBTNS_hdCollection.Set("type", type);
        //    UCLHLCBTNS_btnActPerform.onClick();
        //}
    }

    function UCLHLCBTNS_BtnTJ1() {
        
        laihanid = UCLHLCBTNS_hdCollection.Get("h_laihanid");
       
        if (laihanid == undefined) {
            return;
        }
        UCLHLCBTNS_ASPxCallback1.PerformCallback("tijiao");
    }
    function UCLHLCBTNS_SY() {
        UCLHLCBTNS_ASPxCallback1.PerformCallback("YueTiaoZSY");
    }
    function UCLHLCBTNS_CheckQR() {
        laihanid = UCLHLCBTNS_hdCollection.Get("h_laihanid");
        if (laihanid == undefined) {
            return;
        }
        UCLHLCBTNS_ASPxCallback1.PerformCallback("queren");
    }
    function UCLHLCBTNS_CheckPLQR() {
        laihanid = UCLHLCBTNS_hdCollection.Get("h_laihanid");
        if (laihanid == undefined) {
            return;
        }
        if (confirm("是否执行批量确认?")) {
            UCLHLCBTNS_ASPxCallback1.PerformCallback("plqueren");
        }
    }
    function UCLHLCBTNS_ZJXB() {

        if (confirm("确认直接销表吗?(不走后续流程)")) {
            laihanid = UCLHLCBTNS_hdCollection.Get("h_laihanid");

            if (laihanid == undefined) {
                return;
            }
            UCLHLCBTNS_ASPxCallback1.PerformCallback("zjxb");
        }
    }
    function UCLHLCBTNS_ZJXH() {

        if (confirm("确认直接销户吗?(不走后续流程)")) {
            laihanid = UCLHLCBTNS_hdCollection.Get("h_laihanid");

            if (laihanid == undefined) {
                return;
            }
            UCLHLCBTNS_ASPxCallback1.PerformCallback("zjxh");
        }
    }
    function UCLHLCBTNS_FSTJ() {
        if (fsValidate()) {
            UCLHLCBTNS_ASPxCallback1.PerformCallback("fstj");
        }
    }

    function UCLHLCBTNS_OpenWJLB() {
        var yhh = UCLHLCBTNS_hdCollection.Get("h_yonghuh");;
        var laihan = UCLHLCBTNS_hdCollection.Get("h_laihanbh");
        var laihanlx = UCLHLCBTNS_hdCollection.Get("h_laiHanLX");
        var laihanlc = UCLHLCBTNS_hdCollection.Get("h_laihanlc");
        if (laihan == undefined) {
            return;
        }
        openCenter("/Pages/YongShui/13.LAIHANGL/LAIHANWJLB.aspx?laihanlx=" + laihanlx + "&laihanlc=" + laihanlc + "&laihanbh=" + laihan + "&yonghuh=" + yhh, "700px", "380px")
    }

    function UCLHLCBTNS_OpenSFXX() {
        var laihanlx = UCLHLCBTNS_hdCollection.Get("h_laiHanLX");
        if (laihanlx>=20)
        {
            return;
        }
        var yhh = "";
        var laihan = "";
        yhh = UCLHLCBTNS_hdCollection.Get("h_yonghuh");;
        laihan = UCLHLCBTNS_hdCollection.Get("h_laihanbh");
        if (laihan == undefined) {
            return;
        }
        openCenter("YUEDuTZJHXX.aspx?yonghuh=" + yhh, "960px", "700px");

    }
   
    function UCLHLCBTNS_OpenXXXX() {
        var laihanlx = UCLHLCBTNS_hdCollection.Get("h_laiHanLX");;
        var id = UCLHLCBTNS_hdCollection.Get("h_laihanid");
        if (id == undefined) {
            return;
        }
        var url = "";
        if (laihanlx==2)
        {
            url = "NianDuTZXXXX.aspx" ;
        }
        else if (laihanlx == 5) {
            url = "JiJianTZXXXX.aspx";
        }
        else if (laihanlx == 1) {
            url = "YUEDuTZXX.aspx";
        }
        else if (laihanlx == 3) {
            url = "JiHuaZYXXXX.aspx";
        }
        else if (laihanlx == 6) {
            url = "JiHuaBGXXXX.aspx";
        }
        else if (laihanlx == 8) {
            url = "FenHuXXXX.aspx";
        }
        else if (laihanlx == 9) {
            url = "BingHuXXXX.aspx";
        }
        else if (laihanlx == 11) {
            url = "XiaoHuXXXX.aspx";
        }
        else if (laihanlx == 12) {
            url = "XiaoBiaoXXXX.aspx";
        }
        else if (laihanlx ==7) {
            url = "TuiKuanXXXX.aspx";
        }
        else if (laihanlx == 10) {
            url = "GaiHuXXXX.aspx";
        }
        else if (laihanlx == 13) {
            url = "BiaoJiYSZXXXXX.aspx";
        }
        else if (laihanlx == 14) {
            url = "JiHuaZBZXXXXX.aspx";
        }
        else if (laihanlx == 21) {
            url = "/Pages/QuShui/13.LAIHANGL/BingHuXXXX.aspx";
        }
        else if (laihanlx == 22) {
            url = "/Pages/QuShui/13.LAIHANGL/XiaoHuXXXX.aspx";
        }
        else if (laihanlx == 23) {
            url = "/Pages/QuShui/13.LAIHANGL/XiaoJinXXXX.aspx";
        }
        else if (laihanlx == 24) {
            url = "/Pages/QuShui/13.LAIHANGL/XiaoBiaoXXXX.aspx";
        }
        else if (laihanlx == 25) {
            url = "/Pages/QuShui/13.LAIHANGL/XiaoJinHFXXXX.aspx";
        }
        else if (laihanlx == 26) {
            url = "/Pages/QuShui/13.LAIHANGL/JinGuoHXXXX.aspx";
        }
        else if (laihanlx == 27) {
            url = "/Pages/QuShui/13.LAIHANGL/BiaoGuoHXXXX.aspx";
        }
        else if (laihanlx == 28) {
            url = "/Pages/QuShui/13.LAIHANGL/FenHuXXXX.aspx";
        }
        else if (laihanlx == 29) {
            url = "/Pages/QuShui/13.LAIHANGL/ShenJinLXXGXXXX.aspx";
        }
        else if (laihanlx == 30) {
            url = "/Pages/QuShui/13.LAIHANGL/JinXingZXGXXXX.aspx";
        }
        else if (laihanlx == 31) {
            url = "/Pages/QuShui/13.LAIHANGL/TuiKuanXXXX.aspx";
        }
        else if (laihanlx == 32) {
            url = "/Pages/QuShui/13.LAIHANGL/KaiCaiJHXXXX.aspx";
        }
        else if (laihanlx == 33) {
            url = "/Pages/QuShui/13.LAIHANGL/CaiGuanJHXXXX.aspx";
        }
        else if (laihanlx == 34) {
            url = "/Pages/QuShui/13.LAIHANGL/JiaJiaSLTZXXXX.aspx";
        }
        else if (laihanlx == 35) {
            url = "/Pages/QuShui/13.LAIHANGL/XiaoQuShuiKXXXX.aspx";
        }
        else if (laihanlx == 36) {
            url = "/Pages/QuShui/13.LAIHANGL/QuShuiKGHXXXX.aspx";
        }
        openCenter(url + "?id=" + id, "960px", "700px");
    }
    
</script>
<div>
    <dx:ASPxHiddenField ID="hdCollection" ClientInstanceName="UCLHLCBTNS_hdCollection" runat="server"></dx:ASPxHiddenField>
    <div style="display: none;">
        <dx:ASPxButton ID="btnActPerform" ClientInstanceName="UCLHLCBTNS_btnActPerform" runat="server" Text="ASPxButton" OnClick="btnActPerform_Click"></dx:ASPxButton>
    </div>
    <div style="float:left;padding-top:1px; display: <%=Convert.ToInt32(this.Request["ft"]) == 1 ? "none" : ""%>">
         <dx:ASPxButton ID="btnFHDCL" AutoPostBack="false" runat="server" Text="返回待处理" UseSubmitBehavior="false">
                    <ClientSideEvents Click="function(s,e){location='/Pages/YongShui/14.DaiChuGL/DAICHUL.aspx';}" />
         </dx:ASPxButton>
    </div>
    <div style="float:left;padding-top:1px; display: <%=Convert.ToInt32(this.Request["ft"]) == 1 ? "" : "none"%>">
         <dx:ASPxButton ID="btnSY" AutoPostBack="false" runat="server" Text="审阅" UseSubmitBehavior="false">
                    <ClientSideEvents Click="function(s,e){UCLHLCBTNS_SY();}" />
         </dx:ASPxButton>
    </div>
    <div style="float:right; display: <%=Convert.ToInt32(this.Request["ft"]) == 1 ? "none" : ""%>">
        <table >
        <tr>
            <td align="right">
                <dx:ASPxButton ID="BtnFSTJ" runat="server" AutoPostBack="false" Text="复审提交" Visible="false" UseSubmitBehavior="false">
                    <ClientSideEvents Click="function(s,e){UCLHLCBTNS_FSTJ();}" />
                </dx:ASPxButton>
                <dx:ASPxButton ID="BtnXG" runat="server" Text="修改" AutoPostBack="false" UseSubmitBehavior="false" OnClick="BtnXG_Click"></dx:ASPxButton>
                <dx:ASPxButton ID="BtnQR" AutoPostBack="false" runat="server" Text="确认" UseSubmitBehavior="false">
                    <ClientSideEvents Click="function(s,e){UCLHLCBTNS_CheckQR();}" />
                </dx:ASPxButton>
                <dx:ASPxButton ID="BtnPLQR" AutoPostBack="false" runat="server" Text="批量确认" UseSubmitBehavior="false">
                    <ClientSideEvents Click="function(s,e){UCLHLCBTNS_CheckPLQR();}" />
                </dx:ASPxButton>               
            </td>
        </tr>
        <tr style="height:2px">
            <td></td>
        </tr>
        <tr>
            <td>
                <dx:ASPxButton ID="btnZJXB" runat="server" AutoPostBack="false" Text="直接销表"  UseSubmitBehavior="false" Visible="false">
                    <ClientSideEvents Click="function(s,e){
                                                            UCLHLCBTNS_ZJXB();}" />
                </dx:ASPxButton>
                <dx:ASPxButton ID="btnZJXH" runat="server" AutoPostBack="false" Text="直接销户"  UseSubmitBehavior="false" Visible="false">
                    <ClientSideEvents Click="function(s,e){
                                                            UCLHLCBTNS_ZJXH();}" />
                </dx:ASPxButton>
                <dx:ASPxButton ID="BtnTJ" runat="server" AutoPostBack="false" Text="提交"  UseSubmitBehavior="false">
                    <ClientSideEvents Click="function(s,e){
                                                            UCLHLCBTNS_BtnTJ1();}" />
                </dx:ASPxButton>
                <dx:ASPxButton ID="BtnXXXX" runat="server" Text="详细信息"  AutoPostBack="false" UseSubmitBehavior="false">
                    <ClientSideEvents Click="function(s,e){UCLHLCBTNS_OpenXXXX()}" />
                </dx:ASPxButton>
                <dx:ASPxButton ID="BtnYSSF" runat="server" UseSubmitBehavior="false"  AutoPostBack="false" Text="用水/收费情况">
                    <ClientSideEvents Click="function(s,e){UCLHLCBTNS_OpenSFXX();}" />
                </dx:ASPxButton>
                <dx:ASPxButton ID="BtnWJLB" runat="server" AutoPostBack="false" Text="文件列表"  UseSubmitBehavior="false">
                    <ClientSideEvents Click="function(s,e){UCLHLCBTNS_OpenWJLB();}" />
                </dx:ASPxButton>
            </td>
        </tr>
    </table>
    </div>
    
    <dx:ASPxCallback ID="ASPxCallback1" ClientInstanceName="UCLHLCBTNS_ASPxCallback1" runat="server" OnCallback="ASPxCallback1_Callback" ClientSideEvents-CallbackComplete="function(s,e){UCLHLCBTNS_CallbackComplete(e);}"></dx:ASPxCallback>
</div>

